import Vue from 'vue'

// 引入vue-router组件并在vue中注册
import vueRouter from 'vue-router';
Vue.use(vueRouter);

// 引入vue-resource组件并在vue中注册
import vueResource from 'vue-resource'
Vue.use(vueResource);

import App from "./App.vue";

// 导入mint-ui和它的css方便在项目中使用
import mintUI from 'mint-ui'
Vue.use(mintUI);
import 'mint-ui/lib/style.min.css'

//引入mui的样式
import './static/mui/css/mui.css'

// 引入项目的公共样式
import './static/css/base.css'

// 导入其他组件
import HOME from './components/home.vue'
import SETTING from './components/setting.vue'
import MESSAGE from './components/message.vue'
import SEARCH from './components/search.vue'
import SSQ from './components/ssq/ssqbuy.vue'
import SSQINFO from './components/ssq/ssqinfo.vue'
import FC3D from './components/fc3d/fc3dbuy.vue'
import FC3DINFO from './components/fc3d/fc3dinfo.vue'
import QLC from './components/qlc/qlcbuy.vue'
import QLCINFO from './components/qxc/qxcinfo.vue'
import QXC from './components/qxc/qxcbuy.vue'
import QXCINFO from './components/qxc/qxcinfo.vue'
import DLT from  './components/dlt/dltbuy.vue'
import DLTINFO from './components/dlt/dltinfo.vue'

// 创建路由
let router = new vueRouter({
    linkActiveClass: 'mui-active', // 修改router-lick跳转后使用的类名为mui-active让点击后的底部按钮为高亮
    routes:[
        {// 进入后自动跳转到首页
            path:'/',
            redirect:'/home'
        },
        {
            path:'/home',
            component:HOME
        },
        {
            path:'/message',
            component:MESSAGE
        },
        {
            path:'/search',
            component:SEARCH
        },
        {
            path:'/setting',
            component:SETTING
        },
        {
            path:'/ssq/ssqbuy',
            component:SSQ
        },
        {
            path:'/ssq/ssqinfo',
            component:SSQINFO
        },
        {
            path:'/fc3d/fc3dbuy',
            component:FC3D
        },
        {
            path:'/fc3d/fc3dinfo',
            component:FC3DINFO
        },
        {
            path:'/qlc/qlcbuy',
            component:QLC
        },
        {
            path:'/qlc/qlcinfo',
            component:QLCINFO
        },
        {
            path:'/qxc/qxcbuy',
            component:QXC
        },
        {
            path:'/qxc/qxcinfo',
            component:QXCINFO
        },
        {
            path:'/dlt/dltbuy',
            component:DLT
        },
        {
            path:'/dlt/dltinfo',
            component:DLTINFO
        }
    ]
})

new Vue({
    el: '#app',
    router,
    render: c => c(App)
})
